//package com.erik.lin.activemq.listener;
//
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.stereotype.Component;
//
//import javax.jms.JMSException;
//import javax.jms.Message;
//import javax.jms.MessageListener;
//import javax.jms.TextMessage;
//
///**
// * Created by Erik on 2017/4/27.
// */
//@Component("topicReceiver2")
//public class TopicReceiver2 implements MessageListener {
//
//    private static Logger LOG = LoggerFactory.getLogger(TopicMessageListener.class);
//
//    @Override
//    public void onMessage(Message message) {
//        TextMessage tm = (TextMessage) message;
//        try {
//            LOG.info("消息内容: {}", tm.getText());
//            LOG.info("消息ID: {}", tm.getJMSMessageID());
//            LOG.info("消息Destination: ", tm.getJMSDestination());
//        } catch (JMSException e) {
//            e.printStackTrace();
//        }
//    }
//}